package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Entity
@Table(name = "t_con_collection", schema = "oa", catalog = "")
public class OverDueDetail extends BaseEntity {
    private String id;
    private String mainId;
    private String startTime;
    private String endTime;
    private BigDecimal overduePenaltyAmount;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getOverduePenaltyAmount() {
        return overduePenaltyAmount;
    }

    public void setOverduePenaltyAmount(BigDecimal overduePenaltyAmount) {
        this.overduePenaltyAmount = overduePenaltyAmount;
    }
    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("START_TIME", getStartTime());
        obj.put("END_TIME", getEndTime());
        obj.put("OVERDUE_PENALTY_AMOUNT", getOverduePenaltyAmount());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_con_overDueDetail";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("START_TIME","startTime");
        obj.put("END_TIME", "endTime");
        obj.put("OVERDUE_PENALTY_AMOUNT", "overduePenaltyAmount");
        return obj;
    }

}
